<template>
    <div>
        <table border="1">
            <thead>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
            </thead>
            <tbody>
                <tr v-for="(item,index) in students" :key="index">
                    <td>{{item.name}}</td>
                    <td>{{item.age}}</td>
                    <td>{{item.sex}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>
<script>
export default {
    data(){
        return{
            students:[
                {name:"小明",age:2,sex:"男"},
                {name:"小亮",age:3,sex:"男"},
                {name:"小红",age:4,sex:"女"},
            ]
        }
    }
}
</script>